package UseIO.UsePrintStream;

import java.io.*;

public class PrintStreamWriter {
    public static void main(String[] args) throws IOException {
        printStream();

    }
    public static void printWriter() throws IOException {
        FileReader fileReader = new FileReader("8.内置模块/UseIO/a.txt");
        PrintWriter pw = new PrintWriter(new File("8.内置模块/UseIO/printWriter.txt"));
        int s;
        while ((s=fileReader.read())!=-1){
            pw.println((char) s);
        }
        fileReader.close();
        pw.close();
    }
    public static void printStream() throws FileNotFoundException {
        PrintStream printStream = new PrintStream("8.内置模块/UseIO/printStream.txt");
        printStream.println("啦啦啦啦");
        printStream.println("啊啊啊啊");
        printStream.close();
    }
}
